package org.itboys.mobile.dto.promotion;

import org.itboys.mobile.dto.common.MobileBaseDto;
import org.itboys.mongodb.entity.BaseMySqlEntity;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 作者：zzq
 * 时间：2017年5月15日
 * 描述：圣代_促销_优惠券_DTO。
 */
public class SundayCouponDto extends MobileBaseDto{
    private String baseAmount;//起用的金额
    private String decuAmount;//满减金额
    private Integer status;//1.未使用2，已使用3，已过期
    private String source;//来源。1，注册赠送。2，系统自动发放
    private String endTime;//优惠券结束时间。开始时间就是createTime。

    public SundayCouponDto() {
    }

    public SundayCouponDto(long id, String createTime, String createDate,
                           String baseAmount, String decuAmount, Integer status,
                           String source, String endTime) {
        super(id, createTime, createDate);
        this.baseAmount = baseAmount;
        this.decuAmount = decuAmount;
        this.status = status;
        this.source = source;
        this.endTime = endTime;
    }

    public SundayCouponDto( String baseAmount, String decuAmount, Integer status, String source, String endTime) {

        this.baseAmount = baseAmount;
        this.decuAmount = decuAmount;
        this.status = status;
        this.source = source;
        this.endTime = endTime;
    }

    public String getBaseAmount() {
        return baseAmount;
    }

    public void setBaseAmount(String baseAmount) {
        this.baseAmount = baseAmount;
    }

    public String getDecuAmount() {
        return decuAmount;
    }

    public void setDecuAmount(String decuAmount) {
        this.decuAmount = decuAmount;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getSource() {
        return source;
    }

    public void setSource(String source) {
        this.source = source;
    }

    public String getEndTime() {
        return endTime;
    }

    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }
    public String getStatusStr() {
        String statusStr="";
        if(status==null)return statusStr;

        switch (status) {
            case 1:
                statusStr="未使用";
                break;
            case 2:
                statusStr="已使用";
                break;
            case 3:
                statusStr="已过期";
                break;
            default:
                break;
        }
        return statusStr;
    }
}
